<script th:src="@{/scripts/merchantrole/edit.js}"></script>
<form id="saveForm" method="post">
    <input type="hidden" name="id" id="id" th:value="${role.id}"/>
    <div class="addInfBtn" >
        <h3 class="itemTit"><span>角色信息</span></h3>
        <table class="addNewInfList">
            <tr>
                <th>名称</th>
                <td width="240">
                    <input class="inp-list w-200 clear-mr f-left" type="text" th:value="${role.name}" id="name" name="name" maxlength="32" />
                    <span class="tipStar f-left">*</span>
                </td>
                <th>资源</th>
                <td width="240">
                    <div >
                        <select name="rids" id="rids" multiple="multiple">
                            <option th:each="resource:${resources}" th:value="${resource.id}"
                                    th:text="${#strings.length(resource.name)>20?#strings.substring(resource.name,0,20)+'...':resource.name}"
                                    th:selected="${#lists.contains(rids, resource.id)}"
                                    ></option>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <th>日期</th>
                <td>
                    <input  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="inp-list w-200 clear-mr f-left" th:value="${role.created} ? ${#dates.format(role.created,'yyyy-MM-dd HH:mm:ss')} :''" id="created" name="created"/>
                </td>
            </tr>
        </table>
        <div class="bottomBtnBox">
            <a class="btn-93X38 saveBtn" href="javascript:void(0)">确定</a>
            <a class="btn-93X38 backBtn" href="javascript:closeDialog(0)">返回</a>
        </div>
    </div>

</form>